package com.yuandian.api.management.feign;

import com.yuandian.bpm.common.core.constant.SecurityConstants;
import com.yuandian.bpm.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteExclusiveIndicatorService", value = "bpm-management")
public interface RemoteExclusiveIndicatorService {

	/**
	 * 组装需要展示的字段(需求886-20220510)
	 * @param map 有序的 LinkedHashMap
	 * @return
	 */
	@PostMapping("/exclusiveIndicator/assemblyDisplayField")
	Map<String, Object> assemblyDisplayField(Map<String, Object> map);
	@PostMapping("/innerInterface/assemblyDisplayField")
	Map<String, Object> assemblyDisplayField(Map<String, Object> map, @RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 获取服务资源和专属指标map 服务资源对应的专属指标，list为要显示的指标
	 * @return
	 */
	@GetMapping("/exclusiveIndicator/getResourcesIndicatorsShowMap")
	R<Map<String, List<String>>> getResourcesIndicatorsShowMap();

	/**
	 *获取业务和专属指标map 业务对应的专属指标，list为要显示的指标
	 * @return
	 */
	@GetMapping("/exclusiveIndicator/getBusinessIndicatorsShowMap")
	R<Map<String, List<String>>> getBusinessIndicatorsShowMap();

	/**
	 * 获取端到端关联专属指标 业务对应的专属指标，list为要显示的指标
	 * @return
	 */
	@GetMapping("/exclusiveIndicator/querySegmentConnectList")
	R<Map<String, HashMap<String, Integer>>> querySegmentConnectList();
}
